import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'numberAbs'
})
export class NumberAbsPipe implements PipeTransform {
  transform(value?: any, args?: any): number {
    if (args === -1) {
      return Math.abs(value);
    } else {
      return value;
    }
  }
}
